package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 采购车实体类
 */
@TableName("t_buyerCar")
public class BuyerCarBean {
    //编号
    @TableId(value = "pk_buyerCarId",type = IdType.AUTO)
    private Integer id;
    // 商品实体类
    @TableField(exist = false)
    private GoodsBean goodsBean;
    // 商品id
    @TableField("fk_goodsId")
    private Integer goodsId;
    // 采购数量
    @TableField("b_num")
    private Integer num=1;
    //采购用户的编号
    @TableField("fk_userId")
    private Integer userId;
    //采购价
    @TableField("b_money")
    private Integer money;

    public BuyerCarBean() {
    }

    public BuyerCarBean(Integer goodsId, Integer userId, Integer money,Integer num) {
        this.goodsId = goodsId;
        this.userId = userId;
        this.money = money;
        this.num=num;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public GoodsBean getGoodsBean() {
        return goodsBean;
    }

    public void setGoodsBean(GoodsBean goodsBean) {
        this.goodsBean = goodsBean;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "BuyerCarBean{" +
                "id=" + id +
                ", goodsBean=" + goodsBean +
                ", goodsId=" + goodsId +
                ", num=" + num +
                ", userId=" + userId +
                ", money=" + money +
                "}\n";
    }
}
